import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from './utils/router'
import store from './utils/store'
import App from './App.vue'
//引入element icon
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//引入路由守卫
import '~/utils/permission'

const app = createApp(App)

app.use(ElementPlus)
app.use(router)
app.use(store)


for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

//引入全局windcss样式
import 'virtual:windi.css'
//引入全局滚动条
import 'nprogress/nprogress.css'
//引入模拟接口
import '~/mock/mock'

app.mount('#app')